/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * insumos_articulos_edita.java
 *
 * Created on 9/08/2011, 01:42:42 PM
 */

package sie_invdis;




import java.sql.*;
import javax.swing.*;

import javax.swing.JOptionPane;
import javax.swing.JTable;
import javax.swing.JTable.*;
import java.awt.*;
import java.text.*;
import java.util.Date;
import java.util.Calendar;
import java.text.SimpleDateFormat;
import java.text.ParseException;


import org.jfree.data.category.DefaultCategoryDataset;
import org.jfree.ui.RefineryUtilities;

/**
 *
 * @author Michelle
 */
public class insumos_articulos_edita extends javax.swing.JFrame {

    private javax.swing.table.DefaultTableModel jtable_modelo_kardex;
    private javax.swing.table.DefaultTableModel jtable_modelo_exisalma;
    private javax.swing.table.DefaultTableModel jtable_modelo_estidisticamen;
    private bd_conexion x = new bd_conexion() ;
       //se creaa la variable resultset
    private ResultSet rs = null;
    private SimpleDateFormat formateador = new SimpleDateFormat("dd-MM-yyyy");
    private SimpleDateFormat formateadorame = new SimpleDateFormat("yyyy-MM-dd");
     private SimpleDateFormat formateadoresta = new SimpleDateFormat("yyyy-MM-dd");
    /** Creates new form insumos_articulos_edita */
    public insumos_articulos_edita() {
        initComponents();
    }
 public insumos_articulos_edita(String idinsumo) {
     this.iniciar_modelo_kardex();
     this.iniciar_modelo_almacenexistencia();
     this.iniciar_modelo_estadisticaresumen();
        initComponents();
        this.setTitle("S.I.(Insumos:Actualizando "+idinsumo+")");
        this.carga_datos_catalogo(1, 1, idinsumo, 0);
        this.carga_datos_existenciasalmacen(idinsumo);
        this.carga_datos_consumoresumen(idinsumo);
        jtbl_estadisticaconsumo.getTableHeader().setPreferredSize(new Dimension(jtbl_estadisticaconsumo.getTableHeader().getWidth(),60));
       
    }
 private void iniciar_modelo_kardex()
 {
        jtable_modelo_kardex=new javax.swing.table.DefaultTableModel();//Creo el modelo
        jtable_modelo_kardex.addColumn("<html><BODY><b>Almacen</b></BODY></html>");
        jtable_modelo_kardex.addColumn("<html><BODY><b>id movi</b></BODY></html>");
        jtable_modelo_kardex.addColumn("<html><BODY><b>Fecha</b></BODY></html>");
        jtable_modelo_kardex.addColumn("<html><BODY><b>Tipo Mov</b></BODY></html>");
        jtable_modelo_kardex.addColumn("<html><BODY><b>Ref.</b></BODY></html>");
        jtable_modelo_kardex.addColumn("<html><BODY><b>clie/prov</b></BODY></html>");
        jtable_modelo_kardex.addColumn("<html><BODY><b>Articulo</b></BODY></html>");
        jtable_modelo_kardex.addColumn("<html><BODY><b>Costo</b></BODY></html>");
        jtable_modelo_kardex.addColumn("<html><BODY><b>Precio</b></BODY></html>");
        jtable_modelo_kardex.addColumn("<html><BODY><b>Cantidad</b></BODY></html>");
        jtable_modelo_kardex.addColumn("<html><BODY><b>Historial</b></BODY></html>");
        jtable_modelo_kardex.addColumn("<html><BODY><b>Observ.</b></BODY></html>");
}
private void iniciar_modelo_almacenexistencia()
{
        jtable_modelo_exisalma=new javax.swing.table.DefaultTableModel();//Creo el modelo
        jtable_modelo_exisalma.addColumn("<html><BODY><b>Almacen</b></BODY></html>");
        jtable_modelo_exisalma.addColumn("<html><BODY><b>Articulo</b></BODY></html>");
        jtable_modelo_exisalma.addColumn("<html><BODY><b>Descripcion</b></BODY></html>");
        jtable_modelo_exisalma.addColumn("<html><BODY><b>Existencia</b></BODY></html>");
}
private void iniciar_modelo_estadisticaresumen()
    {
        jtable_modelo_estidisticamen=new javax.swing.table.DefaultTableModel();//Creo el modelo
        jtable_modelo_estidisticamen.addColumn("Mes/Depart");

           try
            {
               rs = x.sieuno_executediversosv2("select * from x1_supervision_tareas_departamentos() as (id smallint,descrip character varying(80));",variables_global.getconexiongral());
               while (rs.next())
                    {
                          jtable_modelo_estidisticamen.addColumn("<html><b>"+rs.getString("id")+":"+rs.getString("descrip")+"</b></html>");
                    }
             }
            catch(Exception e)
            {
                System.out.println(e.getMessage());
            }
        jtable_modelo_estidisticamen.addColumn("Total");
    }


void carga_datos_catalogo(int opcion, int opbuscamp,String busqueda,int almacen)
 {

       Object[] fnewRow = new Object[12];
       String texto="select * from x1distribucion_insumos_articulos_catalogo("+opcion+","+opbuscamp+",'"+busqueda.toUpperCase().trim()+"',"+almacen+") as (id character varying(16),cod character varying(16), idstatus smallint, descristatus character varying(40), describinsumo character varying(80), itemprovee character varying(16), unisal character varying(3), unient character varying(3), facentunidad numeric, uniempaque character varying(12), tipoelemento smallint, describetipoelemen character varying(40), idfamilia character varying(5),describefamilia character varying(40),idlineainsu character varying(5), describelineainsu character varying(40), controlalmacen character varying(20), stockminimo numeric, stockmaximo numeric,precio1 numeric, precio2 numeric,ultimocosto numeric, costoprome numeric, fechaulticompra date, fechaultimaventa date, idprovee character varying(16), describeprovee character varying(80), impuesto1 numeric, impuesto2 numeric, usuario character varying(20),valor_x_insumo character varying(20), observacion character varying(255),existenciainsu numeric)";
       
       System.out.println(texto);
       java.util.Date fechaestaeuropa=null;
       try
        {
           rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
            while (rs.next())
                {
                this.jtf_claveinsumo.setText(rs.getString("id"));
                this.jtf_descripcion.setText(rs.getString("describinsumo"));
                this.jtf_descripcion_estadistica.setText(rs.getString("describinsumo"));
                this.jcbx_statusinsumo.addItem(rs.getString("idstatus")+":"+rs.getString("descristatus"));
                this.jtf_item.setText(rs.getString ("itemprovee"));
                this.jtf_unidadsalida.setText(rs.getString ("unisal"));
                this.jtf_unidadentrada.setText(rs.getString("unient"));
                this.jtf_factor.setText(rs.getString("facentunidad"));
                this.jtf_unidadempake.setText(rs.getString("uniempaque"));
                this.jcbx_tipoelemento.addItem(rs.getString("tipoelemento")+":"+rs.getString("describetipoelemen"));
                this.jcbx_familia.addItem(rs.getString("idfamilia")+":"+rs.getString("describefamilia"));
                this.jcbx_linea.addItem(rs.getString("idlineainsu")+":"+rs.getString("describelineainsu"));
                this.jtf_controlalmacen.setText(rs.getString("controlalmacen"));
                this.jtf_stockminimo.setText(rs.getString("stockminimo"));
                this.jtf_stockmaximo.setText(rs.getString("stockmaximo"));

                this.jtf_precio1.setText(rs.getString("precio1"));
                this.jtf_precio2.setText(rs.getString("precio2"));
                this.jtf_ultimocosto.setText(rs.getString("ultimocosto"));
                this.jtf_costopromedio.setText(rs.getString("ultimocosto"));
                if (rs.getString("fechaulticompra")!= null)
                        {
                            try
                                {
                                    fechaestaeuropa = formateadorame.parse(rs.getString("fechaulticompra"));
                                    this.jdc_ultimacompra.setDate(fechaestaeuropa);
                                }
                            catch (ParseException e)
                                {
                                //Error, la cadena de texto no se puede convertir en fecha.
                                }
                        }
                     if (rs.getString("fechaultimaventa")!= null)
                        {
                            try
                                {
                                    fechaestaeuropa = formateadorame.parse(rs.getString("fechaultimaventa"));
                                    this.jdc_ultimaventa.setDate(fechaestaeuropa);
                                }
                            catch (ParseException e)
                                {
                                //Error, la cadena de texto no se puede convertir en fecha.
                                }
                        }

                this.jtf_idproveedor.setText(rs.getString("idprovee"));
                this.jtf_proveedordescribe.setText(rs.getString("describeprovee"));
                this.jtf_impuesto1.setText(rs.getString("impuesto1"));
                this.jtf_impuesto2.setText(rs.getString("impuesto1"));
                this.jtf_valorx.setText(rs.getString("valor_x_insumo"));
                this.jta_observacion.setText(rs.getString("observacion"));
                
                    //fnewRow[1]=rs.getString ("describetipoelemen");
                    
                    //fnewRow[3]=rs.getString ("describinsumo");
                    //fnewRow[4]=;
                    //fnewRow[5]=;
                    //fnewRow[6]=rs.getString ("precio1");
                    //fnewRow[7]=rs.getString ("fechaulticompra");
                    //fnewRow[8]=rs.getString ("idprovee");
                    //fnewRow[9]=rs.getString ("observacion");
                    //fnewRow[10]=rs.getString ("existenciainsu");
                    
                    //jtable_modelo.addRow(fnewRow);
                }

        }
        catch(Exception e)
        {
            System.out.println(e.getMessage());
        }

 }
void carga_datos_existenciasalmacen(String busqueda)
 {
       DecimalFormat miformat = new DecimalFormat("###,###,###");
       Object[] fnewRow = new Object[4];
       String texto="select * from x1distribucion_insumos_articulos_exist_almacenes('"+busqueda.toUpperCase().trim()+"') as (idinsumo character varying(16),existencia numeric,almacen smallint)";
       rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
       System.out.println(texto);
       try
        {
            while (rs.next())
                {

                    fnewRow[0]=rs.getString ("almacen");
                    fnewRow[1]=rs.getString ("idinsumo");
                    fnewRow[2]=this.jtf_descripcion.getText();
                    fnewRow[3]=miformat.format(rs.getFloat("existencia"));
                   jtable_modelo_exisalma.addRow(fnewRow);
                }

        }
        catch(Exception e)
        {
            System.out.println(e.getMessage());
        }

 }
void carga_datos_kardex(int opcion, String busqueda,String almacen)
 {
       DecimalFormat miformat = new DecimalFormat("###,###,###");
       while(jtable_modelo_kardex.getRowCount()>0)jtable_modelo_kardex.removeRow(0);
       float historial=0;
       Object[] fnewRow = new Object[12];
       String texto="select * from x1distribucion_insumos_articulos_kardex("+opcion+",'"+busqueda.toUpperCase().trim()+"',"+almacen+") as (folio integer,fechamov timestamp,tipomovinve smallint,tipodescribe text,referenciainve character varying(16),fechareferencia date,clave_clie_prov character varying(16),idarticuloinve character varying(16),cantidadinve numeric,precioinve numeric,costoinve numeric,observainve character varying(80),almacen smallint)",abrehtml="",cierrahtml="";
       rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
       System.out.println(texto);
       try
        {
            while (rs.next())
                {
                if(rs.getFloat("cantidadinve") > 0 )//significa que fue entrada
                    {
                        abrehtml="<html><b>";
                        cierrahtml="</b></html>";
                    }
                else
                    {
                        abrehtml="";
                        cierrahtml="";
                    }
                    historial+=rs.getFloat("cantidadinve");
                    fnewRow[0]=almacen;
                    fnewRow[1]=rs.getString ("folio");
                    fnewRow[2]=this.fechaeuropea(rs.getString ("fechareferencia"));
                    fnewRow[3]=rs.getString ("tipomovinve")+":"+rs.getString ("tipodescribe");
                    fnewRow[4]=rs.getString ("referenciainve");
                    fnewRow[5]=rs.getString ("clave_clie_prov");
                    fnewRow[6]=this.jtf_descripcion.getText();
                    fnewRow[7]=rs.getString ("costoinve");
                    fnewRow[8]=rs.getString ("precioinve");
                    fnewRow[9]=abrehtml+rs.getString ("cantidadinve")+cierrahtml;
                    fnewRow[10]=abrehtml+miformat.format(historial)+cierrahtml;
                    fnewRow[11]=rs.getString ("observainve");

                    jtable_modelo_kardex.addRow(fnewRow);
                }

        }
        catch(Exception e)
        {
            System.out.println(e.getMessage());
        }

 }


private void carga_datos_consumoresumen(String idinsumo)
    {
       String fechaeuro="";
       int columnatitulo=0;
       String mespartido="";
        int ncol=this.jtable_modelo_estidisticamen.getColumnCount();
       Object[] fnewRow = new Object[ncol];
    rs = x.sieuno_executediversosv2("select * from x1distribucion_insumos_salidas_det_resuxmes('"+idinsumo+"') as (fecha date,idinsumo character varying(16),importe numeric,importecosto numeric,cantidadrecibido numeric,fechaenmes text,iddepa smallint);",variables_global.getconexiongral());
        try
        {
            while (rs.next())
                {
                        mespartido=rs.getString("iddepa");
                        columnatitulo=this.findcolumna_idtienda(mespartido);
                        this.crea_hoja_consumoresumen(rs.getString("fechaenmes"),rs.getString("cantidadrecibido"),columnatitulo);
                }
        }
        catch(Exception e)
        {
            System.out.println(e.getMessage());
        }
     fnewRow[0]="Totales:";
     jtable_modelo_estidisticamen.addRow(fnewRow);
     this.contruir_totales_resumenconsumo();
     }
private int findcolumna_idtienda (String titulo)  {
  int columnas = jtable_modelo_estidisticamen.getColumnCount(),columencontrado=0;
  String columtitulo[]=null;
      for(int j = 0 ;j < columnas ; j++)
                {
                    columtitulo= jtable_modelo_estidisticamen.getColumnName(j).replace("<html><b>","").split(":");
                     System.out.println("Busqueda:"+columtitulo[0]+" "+titulo);
                    if(columtitulo[0].equals(titulo))
                        {
                            columencontrado=j;
                             System.out.println(titulo+" "+columtitulo[0]+" "+columencontrado);
                        }
                }
    return columencontrado;
}
private void crea_hoja_consumoresumen(String mes,String cantidad,int columna)
    {
        DecimalFormat miformat = new DecimalFormat("###,###,###");
        int numerofilas=this.jtable_modelo_estidisticamen.getRowCount();
        String idstat="";
        int numerocolumnas=this.jtable_modelo_estidisticamen.getColumnCount(),ii=00;
        int encontrado=0;
        Object[] fnewRow = new Object[numerocolumnas];
        float cantifam=0;
       //invoco al metodo que trae el recordset de datos
        cantifam=Float.valueOf(cantidad);
        for( ii=0;ii<numerofilas;ii++)
                {
                    idstat=jtable_modelo_estidisticamen.getValueAt(ii, 0).toString();
                    System.out.println("Agregando:"+cantidad+" "+mes);
                    if (idstat.equals(mes))
                        {
                            encontrado=1;
                            jtable_modelo_estidisticamen.setValueAt(miformat.format(cantifam),ii ,columna);
                        }
                }
       if(encontrado==0)
            {
            fnewRow[0]=mes;
            for( ii=1;ii<numerocolumnas;ii++)
                {
                               System.out.println(mes);
                               if(ii==columna)
                                    {
                                        fnewRow[ii]=miformat.format(cantifam);
                                    }
                               else
                                    {
                                        fnewRow[ii]="0";
                                    }
                }
             jtable_modelo_estidisticamen.addRow(fnewRow);
           }
    }
private void contruir_totales_resumenconsumo()
    {
         DecimalFormat myFormatter = new DecimalFormat("###,###,###");
         float totalve=0;
         int totalfilasreporte=this.jtable_modelo_estidisticamen.getRowCount()-1,i=0,ii=0;
         int numerotiendas=this.jtable_modelo_estidisticamen.getColumnCount()-2;
         //genero los totales por tienda
          System.out.println("aqui ta chingando la madre"+numerotiendas);
         for( ii=0;ii<numerotiendas;ii++)
            {
             totalve=0;
                for(i=0;i<totalfilasreporte;i++)
                    {
                        totalve+=Float.valueOf(jtable_modelo_estidisticamen.getValueAt(i, ii+1).toString().replace(",","").replace(".",""));
                    }
                    jtable_modelo_estidisticamen.setValueAt("<html><h3><b>"+myFormatter.format(totalve)+"</b></h3></html>",i,ii+1);
            }
           totalve=0;
           for(i=0;i<totalfilasreporte;i++)
                  {
                        totalve=0;
                        for( ii=0;ii<numerotiendas;ii++)
                        {
                            totalve+=Float.valueOf(jtable_modelo_estidisticamen.getValueAt(i, ii+1).toString().replace(",","").replace(".",""));
                        }
                        jtable_modelo_estidisticamen.setValueAt("<html><h3><b>"+myFormatter.format(totalve)+"</b></h3></html>",i,ii+1);
                  }
     }

private void dioclick(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
        // System.out.println("dio doble  click");
         int fila = jtbl_existenciaalma.getSelectedRow();
            String almacen = jtbl_existenciaalma.getValueAt(fila, 0).toString();
            String idinsu = jtbl_existenciaalma.getValueAt(fila, 1).toString();
        this.carga_datos_kardex(1, idinsu, almacen);
    }
private void insumo_actualizar(){
    int confirma=0;
    String arreglo_status[]=this.jcbx_statusinsumo.getSelectedItem().toString().split(":");
    String arreglo_tipoele[]=this.jcbx_tipoelemento.getSelectedItem().toString().split(":");
    String arreglo_familia[]=this.jcbx_familia.getSelectedItem().toString().split(":");
    String arreglo_linea[]=this.jcbx_linea.getSelectedItem().toString().split(":");
    String sfechaulc=this.fechaamericana(this.jdc_ultimacompra.getDate());
    String sfechaulv=this.fechaamericana(this.jdc_ultimaventa.getDate());
    String texto="select * from x1distribucion_insumos_articulos_actualiza(1,'','"+this.jtf_insucodigo.getText().trim().toUpperCase()+"','"+arreglo_status[0]+"','"+this.jtf_descripcion.getText().trim().toUpperCase()+"','"+this.jtf_item.getText().trim().toUpperCase()+"','"+this.jtf_unidadsalida.getText().trim().toUpperCase()+"','"+this.jtf_unidadentrada.getText().trim().toUpperCase()+"','"+this.jtf_factor.getText().trim().toUpperCase()+"','"+this.jtf_unidadempake.getText().trim().toUpperCase()+"','"+arreglo_tipoele[0]+"','"+arreglo_familia[0]+"','"+arreglo_linea[0]+"','"+this.jtf_controlalmacen.getText().trim().toUpperCase()+"','"+this.jtf_stockminimo.getText().trim().toUpperCase()+"','"+this.jtf_stockmaximo.getText().trim().toUpperCase()+"','"+this.jtf_precio1.getText().trim().toUpperCase()+"','"+this.jtf_precio2.getText().trim().toUpperCase()+"','"+this.jtf_ultimocosto.getText().trim()+"','"+this.jtf_costopromedio.getText().trim().toUpperCase()+"','"+sfechaulc+"','"+sfechaulv+"','"+this.jtf_idproveedor.getText().trim().toUpperCase()+"','"+this.jtf_impuesto1.getText().trim().toUpperCase()+"','"+this.jtf_impuesto2.getText().trim().toUpperCase()+"','','"+this.jtf_valorx.getText().trim().toUpperCase()+"','"+this.jta_observacion.getText().trim().toUpperCase()+"','"+this.jtf_claveinsumo.getText().trim()+"')";
    System.out.println(texto);
        try
         {
            rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
            while (rs.next())
                {
                     confirma=rs.getInt(1);
                }
        }
        catch(Exception e)
        {
            System.out.println(e.getMessage());
        }
       if (confirma==1)
              {
                JOptionPane.showMessageDialog(null,"Gracias datos Actualizados Correctamente", "Sistema Integral Insumos",1);
              }
         else
              {
                JOptionPane.showMessageDialog(null,"Error Consulte con Su Administrador", "Sistema Integral Insumos",1);
              }
}

private String fechaamericana(Date fe) {
       SimpleDateFormat formateadorestaeuropa = new SimpleDateFormat("yyyy-MM-dd");
       String cadenafecha="";
       cadenafecha= formateadorestaeuropa.format(fe);
       return cadenafecha;
    }
private String  fechaeuropea(String fecha) {

         //resibe cadena de fecha en formato americano yyyy-MM-dd
        java.util.Date fechaestaeuropa=null;
       SimpleDateFormat formateadorestaeuropa = new SimpleDateFormat("dd-MM-yyyy");
       String cadenafecha="";
        try
         {
          fechaestaeuropa = formateadoresta.parse(fecha);
         }
        catch (ParseException e)
          {
             //Error, la cadena de texto no se puede convertir en fecha.
          }
       cadenafecha= formateadorestaeuropa.format(fechaestaeuropa);
       return cadenafecha;

    }
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jTabbedPane1 = new javax.swing.JTabbedPane();
        jPanel1 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jtf_claveinsumo = new javax.swing.JTextField();
        jLabel3 = new javax.swing.JLabel();
        jtf_descripcion = new javax.swing.JTextField();
        jLabel2 = new javax.swing.JLabel();
        jtf_insucodigo = new javax.swing.JTextField();
        jcbx_statusinsumo = new javax.swing.JComboBox();
        jLabel5 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        jtf_item = new javax.swing.JTextField();
        jLabel27 = new javax.swing.JLabel();
        jtf_unidadsalida = new javax.swing.JTextField();
        jtf_unidadentrada = new javax.swing.JTextField();
        jLabel28 = new javax.swing.JLabel();
        jtf_factor = new javax.swing.JTextField();
        jLabel29 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        jcbx_tipoelemento = new javax.swing.JComboBox();
        jLabel8 = new javax.swing.JLabel();
        jcbx_familia = new javax.swing.JComboBox();
        jLabel9 = new javax.swing.JLabel();
        jcbx_linea = new javax.swing.JComboBox();
        jtf_controlalmacen = new javax.swing.JTextField();
        jLabel30 = new javax.swing.JLabel();
        jtf_stockminimo = new javax.swing.JTextField();
        jLabel31 = new javax.swing.JLabel();
        jtf_stockmaximo = new javax.swing.JTextField();
        jLabel32 = new javax.swing.JLabel();
        jLabel33 = new javax.swing.JLabel();
        jtf_precio1 = new javax.swing.JTextField();
        jLabel34 = new javax.swing.JLabel();
        jtf_precio2 = new javax.swing.JTextField();
        jLabel35 = new javax.swing.JLabel();
        jtf_ultimocosto = new javax.swing.JTextField();
        jLabel36 = new javax.swing.JLabel();
        jtf_costopromedio = new javax.swing.JTextField();
        jdc_ultimacompra = new com.toedter.calendar.JDateChooser();
        jLabel37 = new javax.swing.JLabel();
        jdc_ultimaventa = new com.toedter.calendar.JDateChooser();
        jLabel38 = new javax.swing.JLabel();
        jLabel10 = new javax.swing.JLabel();
        jtf_idproveedor = new javax.swing.JTextField();
        jtf_proveedordescribe = new javax.swing.JTextField();
        jLabel39 = new javax.swing.JLabel();
        jtf_impuesto1 = new javax.swing.JTextField();
        jLabel40 = new javax.swing.JLabel();
        jtf_impuesto2 = new javax.swing.JTextField();
        jtf_valorx = new javax.swing.JTextField();
        jLabel11 = new javax.swing.JLabel();
        jScrollPane2 = new javax.swing.JScrollPane();
        jta_observacion = new javax.swing.JTextArea();
        jLabel13 = new javax.swing.JLabel();
        jbtn_guardacambios = new javax.swing.JButton();
        jbtn_salir = new javax.swing.JButton();
        jbtn_ayuda = new javax.swing.JButton();
        jLabel41 = new javax.swing.JLabel();
        jtf_unidadempake = new javax.swing.JTextField();
        jPanel2 = new javax.swing.JPanel();
        jPanel4 = new javax.swing.JPanel();
        jScrollPane5 = new javax.swing.JScrollPane();
        jtbl_existenciaalma = new javax.swing.JTable(){
            public boolean isCellEditable(int rowIndex, int mColIndex) {
                return false;
            }}
            ;
            jPanel5 = new javax.swing.JPanel();
            jScrollPane4 = new javax.swing.JScrollPane();
            jtbl_kardex = new javax.swing.JTable(){
                public boolean isCellEditable(int rowIndex, int mColIndex) {
                    return false;
                }}
                ;
                jPanel3 = new javax.swing.JPanel();
                jPanel6 = new javax.swing.JPanel();
                jScrollPane6 = new javax.swing.JScrollPane();
                jtbl_estadisticaconsumo = new javax.swing.JTable(){
                    public boolean isCellEditable(int rowIndex, int mColIndex) {
                        return false;
                    }}
                    ;
                    jtf_descripcion_estadistica = new javax.swing.JTextField();
                    jLabel4 = new javax.swing.JLabel();
                    jMenuBar1 = new javax.swing.JMenuBar();
                    jMenu1 = new javax.swing.JMenu();
                    jmni_salir = new javax.swing.JMenuItem();
                    jMenu2 = new javax.swing.JMenu();
                    jmni_escape = new javax.swing.JMenuItem();
                    jMenu3 = new javax.swing.JMenu();

                    setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
                    setName("Form"); // NOI18N

                    jTabbedPane1.setName("jTabbedPane1"); // NOI18N

                    jPanel1.setName("jPanel1"); // NOI18N

                    org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(sie_invdis.Sie_invdisApp.class).getContext().getResourceMap(insumos_articulos_edita.class);
                    jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N
                    jLabel1.setName("jLabel1"); // NOI18N

                    jtf_claveinsumo.setEditable(false);
                    jtf_claveinsumo.setText(resourceMap.getString("jtf_claveinsumo.text")); // NOI18N
                    jtf_claveinsumo.setName("jtf_claveinsumo"); // NOI18N

                    jLabel3.setText(resourceMap.getString("jLabel3.text")); // NOI18N
                    jLabel3.setName("jLabel3"); // NOI18N

                    jtf_descripcion.setText(resourceMap.getString("jtf_descripcion.text")); // NOI18N
                    jtf_descripcion.setName("jtf_descripcion"); // NOI18N

                    jLabel2.setText(resourceMap.getString("jLabel2.text")); // NOI18N
                    jLabel2.setName("jLabel2"); // NOI18N

                    jtf_insucodigo.setName("jtf_insucodigo"); // NOI18N

                    jcbx_statusinsumo.setName("jcbx_statusinsumo"); // NOI18N
                    jcbx_statusinsumo.addActionListener(new java.awt.event.ActionListener() {
                        public void actionPerformed(java.awt.event.ActionEvent evt) {
                            jcbx_statusinsumoActionPerformed(evt);
                        }
                    });

                    jLabel5.setText(resourceMap.getString("jLabel5.text")); // NOI18N
                    jLabel5.setName("jLabel5"); // NOI18N

                    jLabel7.setText(resourceMap.getString("jLabel7.text")); // NOI18N
                    jLabel7.setName("jLabel7"); // NOI18N

                    jtf_item.setMinimumSize(new java.awt.Dimension(6, 18));
                    jtf_item.setName("jtf_item"); // NOI18N
                    jtf_item.addActionListener(new java.awt.event.ActionListener() {
                        public void actionPerformed(java.awt.event.ActionEvent evt) {
                            jtf_itemActionPerformed(evt);
                        }
                    });

                    jLabel27.setText(resourceMap.getString("jLabel27.text")); // NOI18N
                    jLabel27.setName("jLabel27"); // NOI18N

                    jtf_unidadsalida.setName("jtf_unidadsalida"); // NOI18N

                    jtf_unidadentrada.setName("jtf_unidadentrada"); // NOI18N

                    jLabel28.setText(resourceMap.getString("jLabel28.text")); // NOI18N
                    jLabel28.setName("jLabel28"); // NOI18N

                    jtf_factor.setName("jtf_factor"); // NOI18N

                    jLabel29.setText(resourceMap.getString("jLabel29.text")); // NOI18N
                    jLabel29.setName("jLabel29"); // NOI18N

                    jLabel6.setText(resourceMap.getString("jLabel6.text")); // NOI18N
                    jLabel6.setName("jLabel6"); // NOI18N

                    jcbx_tipoelemento.setName("jcbx_tipoelemento"); // NOI18N
                    jcbx_tipoelemento.addActionListener(new java.awt.event.ActionListener() {
                        public void actionPerformed(java.awt.event.ActionEvent evt) {
                            jcbx_tipoelementoActionPerformed(evt);
                        }
                    });

                    jLabel8.setText(resourceMap.getString("jLabel8.text")); // NOI18N
                    jLabel8.setName("jLabel8"); // NOI18N

                    jcbx_familia.setName("jcbx_familia"); // NOI18N
                    jcbx_familia.addActionListener(new java.awt.event.ActionListener() {
                        public void actionPerformed(java.awt.event.ActionEvent evt) {
                            jcbx_familiaActionPerformed(evt);
                        }
                    });

                    jLabel9.setText(resourceMap.getString("jLabel9.text")); // NOI18N
                    jLabel9.setName("jLabel9"); // NOI18N

                    jcbx_linea.setName("jcbx_linea"); // NOI18N
                    jcbx_linea.addActionListener(new java.awt.event.ActionListener() {
                        public void actionPerformed(java.awt.event.ActionEvent evt) {
                            jcbx_lineaActionPerformed(evt);
                        }
                    });

                    jtf_controlalmacen.setName("jtf_controlalmacen"); // NOI18N

                    jLabel30.setText(resourceMap.getString("jLabel30.text")); // NOI18N
                    jLabel30.setName("jLabel30"); // NOI18N

                    jtf_stockminimo.setName("jtf_stockminimo"); // NOI18N

                    jLabel31.setText(resourceMap.getString("jLabel31.text")); // NOI18N
                    jLabel31.setName("jLabel31"); // NOI18N

                    jtf_stockmaximo.setName("jtf_stockmaximo"); // NOI18N

                    jLabel32.setText(resourceMap.getString("jLabel32.text")); // NOI18N
                    jLabel32.setName("jLabel32"); // NOI18N

                    jLabel33.setText(resourceMap.getString("jLabel33.text")); // NOI18N
                    jLabel33.setName("jLabel33"); // NOI18N

                    jtf_precio1.setName("jtf_precio1"); // NOI18N

                    jLabel34.setText(resourceMap.getString("jLabel34.text")); // NOI18N
                    jLabel34.setName("jLabel34"); // NOI18N

                    jtf_precio2.setName("jtf_precio2"); // NOI18N

                    jLabel35.setText(resourceMap.getString("jLabel35.text")); // NOI18N
                    jLabel35.setName("jLabel35"); // NOI18N

                    jtf_ultimocosto.setName("jtf_ultimocosto"); // NOI18N

                    jLabel36.setText(resourceMap.getString("jLabel36.text")); // NOI18N
                    jLabel36.setName("jLabel36"); // NOI18N

                    jtf_costopromedio.setName("jtf_costopromedio"); // NOI18N

                    jdc_ultimacompra.setToolTipText(resourceMap.getString("jdc_ultimacompra.toolTipText")); // NOI18N
                    jdc_ultimacompra.setDateFormatString(resourceMap.getString("jdc_ultimacompra.dateFormatString")); // NOI18N
                    jdc_ultimacompra.setName("jdc_ultimacompra"); // NOI18N
                    jdc_ultimacompra.addKeyListener(new java.awt.event.KeyAdapter() {
                        public void keyPressed(java.awt.event.KeyEvent evt) {
                            jdc_ultimacompraKeyPressed(evt);
                        }
                    });

                    jLabel37.setFont(resourceMap.getFont("jLabel37.font")); // NOI18N
                    jLabel37.setText(resourceMap.getString("jLabel37.text")); // NOI18N
                    jLabel37.setName("jLabel37"); // NOI18N

                    jdc_ultimaventa.setToolTipText(resourceMap.getString("jdc_ultimaventa.toolTipText")); // NOI18N
                    jdc_ultimaventa.setDateFormatString(resourceMap.getString("jdc_ultimaventa.dateFormatString")); // NOI18N
                    jdc_ultimaventa.setName("jdc_ultimaventa"); // NOI18N
                    jdc_ultimaventa.addKeyListener(new java.awt.event.KeyAdapter() {
                        public void keyPressed(java.awt.event.KeyEvent evt) {
                            jdc_ultimaventaKeyPressed(evt);
                        }
                    });

                    jLabel38.setFont(resourceMap.getFont("jLabel38.font")); // NOI18N
                    jLabel38.setText(resourceMap.getString("jLabel38.text")); // NOI18N
                    jLabel38.setName("jLabel38"); // NOI18N

                    jLabel10.setText(resourceMap.getString("jLabel10.text")); // NOI18N
                    jLabel10.setName("jLabel10"); // NOI18N

                    jtf_idproveedor.setText(resourceMap.getString("jtf_idproveedor.text")); // NOI18N
                    jtf_idproveedor.setName("jtf_idproveedor"); // NOI18N

                    jtf_proveedordescribe.setEditable(false);
                    jtf_proveedordescribe.setText(resourceMap.getString("jtf_proveedordescribe.text")); // NOI18N
                    jtf_proveedordescribe.setName("jtf_proveedordescribe"); // NOI18N

                    jLabel39.setText(resourceMap.getString("jLabel39.text")); // NOI18N
                    jLabel39.setName("jLabel39"); // NOI18N

                    jtf_impuesto1.setName("jtf_impuesto1"); // NOI18N

                    jLabel40.setText(resourceMap.getString("jLabel40.text")); // NOI18N
                    jLabel40.setName("jLabel40"); // NOI18N

                    jtf_impuesto2.setName("jtf_impuesto2"); // NOI18N

                    jtf_valorx.setMinimumSize(new java.awt.Dimension(6, 18));
                    jtf_valorx.setName("jtf_valorx"); // NOI18N
                    jtf_valorx.addActionListener(new java.awt.event.ActionListener() {
                        public void actionPerformed(java.awt.event.ActionEvent evt) {
                            jtf_valorxActionPerformed(evt);
                        }
                    });

                    jLabel11.setText(resourceMap.getString("jLabel11.text")); // NOI18N
                    jLabel11.setName("jLabel11"); // NOI18N

                    jScrollPane2.setName("jScrollPane2"); // NOI18N

                    jta_observacion.setColumns(20);
                    jta_observacion.setRows(5);
                    jta_observacion.setName("jta_observacion"); // NOI18N
                    jScrollPane2.setViewportView(jta_observacion);

                    jLabel13.setText(resourceMap.getString("jLabel13.text")); // NOI18N
                    jLabel13.setName("jLabel13"); // NOI18N

                    jbtn_guardacambios.setIcon(resourceMap.getIcon("jbtn_guardacambios.icon")); // NOI18N
                    jbtn_guardacambios.setText(resourceMap.getString("jbtn_guardacambios.text")); // NOI18N
                    jbtn_guardacambios.setName("jbtn_guardacambios"); // NOI18N
                    jbtn_guardacambios.addActionListener(new java.awt.event.ActionListener() {
                        public void actionPerformed(java.awt.event.ActionEvent evt) {
                            jbtn_guardacambiosActionPerformed(evt);
                        }
                    });

                    jbtn_salir.setIcon(resourceMap.getIcon("jbtn_salir.icon")); // NOI18N
                    jbtn_salir.setText(resourceMap.getString("jbtn_salir.text")); // NOI18N
                    jbtn_salir.setName("jbtn_salir"); // NOI18N
                    jbtn_salir.addActionListener(new java.awt.event.ActionListener() {
                        public void actionPerformed(java.awt.event.ActionEvent evt) {
                            jbtn_salirActionPerformed(evt);
                        }
                    });

                    jbtn_ayuda.setIcon(resourceMap.getIcon("jbtn_ayuda.icon")); // NOI18N
                    jbtn_ayuda.setText(resourceMap.getString("jbtn_ayuda.text")); // NOI18N
                    jbtn_ayuda.setName("jbtn_ayuda"); // NOI18N
                    jbtn_ayuda.addActionListener(new java.awt.event.ActionListener() {
                        public void actionPerformed(java.awt.event.ActionEvent evt) {
                            jbtn_ayudaActionPerformed(evt);
                        }
                    });

                    jLabel41.setText(resourceMap.getString("jLabel41.text")); // NOI18N
                    jLabel41.setName("jLabel41"); // NOI18N

                    jtf_unidadempake.setName("jtf_unidadempake"); // NOI18N

                    javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
                    jPanel1.setLayout(jPanel1Layout);
                    jPanel1Layout.setHorizontalGroup(
                        jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(jPanel1Layout.createSequentialGroup()
                            .addContainerGap()
                            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(jPanel1Layout.createSequentialGroup()
                                    .addComponent(jLabel1)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jtf_claveinsumo, javax.swing.GroupLayout.PREFERRED_SIZE, 147, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(18, 18, 18)
                                    .addComponent(jLabel2)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jtf_insucodigo, javax.swing.GroupLayout.PREFERRED_SIZE, 147, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(31, 31, 31)
                                    .addComponent(jLabel5)
                                    .addGap(18, 18, 18)
                                    .addComponent(jcbx_statusinsumo, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGroup(jPanel1Layout.createSequentialGroup()
                                    .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 67, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jtf_descripcion, javax.swing.GroupLayout.PREFERRED_SIZE, 354, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(18, 18, 18)
                                    .addComponent(jLabel7)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(jtf_item, javax.swing.GroupLayout.PREFERRED_SIZE, 137, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGroup(jPanel1Layout.createSequentialGroup()
                                    .addComponent(jLabel32)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jtf_controlalmacen, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(18, 18, 18)
                                    .addComponent(jLabel30)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jtf_stockminimo, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(jLabel31)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jtf_stockmaximo, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGroup(jPanel1Layout.createSequentialGroup()
                                    .addComponent(jLabel33)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jtf_precio1, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(18, 18, 18)
                                    .addComponent(jLabel34)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jtf_precio2, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(jLabel35)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jtf_ultimocosto, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jLabel36)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jtf_costopromedio, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGroup(jPanel1Layout.createSequentialGroup()
                                    .addComponent(jLabel37)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jdc_ultimacompra, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(18, 18, 18)
                                    .addComponent(jLabel38)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jdc_ultimaventa, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGroup(jPanel1Layout.createSequentialGroup()
                                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()
                                            .addComponent(jLabel27)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(jtf_unidadsalida, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(jLabel28)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(jtf_unidadentrada))
                                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()
                                            .addComponent(jLabel6)
                                            .addGap(18, 18, 18)
                                            .addComponent(jcbx_tipoelemento, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)))
                                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addGroup(jPanel1Layout.createSequentialGroup()
                                            .addGap(18, 18, 18)
                                            .addComponent(jLabel8)
                                            .addGap(18, 18, 18)
                                            .addComponent(jcbx_familia, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addGap(18, 18, 18)
                                            .addComponent(jLabel9)
                                            .addGap(18, 18, 18)
                                            .addComponent(jcbx_linea, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE))
                                        .addGroup(jPanel1Layout.createSequentialGroup()
                                            .addGap(4, 4, 4)
                                            .addComponent(jLabel29)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(jtf_factor, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(jLabel41)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(jtf_unidadempake, javax.swing.GroupLayout.PREFERRED_SIZE, 112, javax.swing.GroupLayout.PREFERRED_SIZE))))
                                .addGroup(jPanel1Layout.createSequentialGroup()
                                    .addComponent(jLabel13)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 303, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGroup(jPanel1Layout.createSequentialGroup()
                                    .addComponent(jLabel10)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jtf_idproveedor, javax.swing.GroupLayout.PREFERRED_SIZE, 47, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jtf_proveedordescribe, javax.swing.GroupLayout.PREFERRED_SIZE, 223, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()
                                        .addComponent(jbtn_guardacambios)
                                        .addGap(86, 86, 86)
                                        .addComponent(jbtn_salir)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                        .addComponent(jbtn_ayuda))
                                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()
                                        .addComponent(jLabel39)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(jtf_impuesto1, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addGap(18, 18, 18)
                                        .addComponent(jLabel40)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(jtf_impuesto2, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                        .addComponent(jLabel11)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                        .addComponent(jtf_valorx, javax.swing.GroupLayout.PREFERRED_SIZE, 137, javax.swing.GroupLayout.PREFERRED_SIZE))))
                            .addContainerGap(282, Short.MAX_VALUE))
                    );
                    jPanel1Layout.setVerticalGroup(
                        jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(jPanel1Layout.createSequentialGroup()
                            .addContainerGap()
                            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jLabel1)
                                .addComponent(jtf_claveinsumo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel2)
                                .addComponent(jtf_insucodigo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel5)
                                .addComponent(jcbx_statusinsumo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGap(18, 18, 18)
                            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jLabel3)
                                .addComponent(jtf_descripcion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel7)
                                .addComponent(jtf_item, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGap(18, 18, 18)
                            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jLabel27)
                                .addComponent(jtf_unidadsalida, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel28)
                                .addComponent(jtf_unidadentrada, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel29)
                                .addComponent(jtf_factor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel41)
                                .addComponent(jtf_unidadempake, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGap(18, 18, 18)
                            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jLabel6)
                                .addComponent(jcbx_tipoelemento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel8)
                                .addComponent(jcbx_familia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel9)
                                .addComponent(jcbx_linea, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGap(18, 18, 18)
                            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jtf_controlalmacen, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel30)
                                .addComponent(jtf_stockminimo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel31)
                                .addComponent(jtf_stockmaximo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel32))
                            .addGap(18, 18, 18)
                            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jtf_precio1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel34)
                                .addComponent(jtf_precio2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel35)
                                .addComponent(jtf_ultimocosto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel33)
                                .addComponent(jLabel36)
                                .addComponent(jtf_costopromedio, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGap(18, 18, 18)
                            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jdc_ultimacompra, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel37)
                                .addComponent(jLabel38)
                                .addComponent(jdc_ultimaventa, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGap(18, 18, 18)
                            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jLabel10)
                                .addComponent(jtf_idproveedor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jtf_proveedordescribe, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 38, Short.MAX_VALUE)
                            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jtf_impuesto1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel40)
                                .addComponent(jtf_impuesto2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel39)
                                .addComponent(jLabel11)
                                .addComponent(jtf_valorx, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGap(27, 27, 27)
                            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(jPanel1Layout.createSequentialGroup()
                                    .addGap(12, 12, 12)
                                    .addComponent(jLabel13))
                                .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGap(74, 74, 74)
                            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jbtn_guardacambios)
                                .addComponent(jbtn_salir)
                                .addComponent(jbtn_ayuda))
                            .addContainerGap())
                    );

                    jTabbedPane1.addTab(resourceMap.getString("jPanel1.TabConstraints.tabTitle"), jPanel1); // NOI18N

                    jPanel2.setName("jPanel2"); // NOI18N

                    jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel4.border.title"))); // NOI18N
                    jPanel4.setName("jPanel4"); // NOI18N

                    jScrollPane5.setName("jScrollPane5"); // NOI18N

                    jtbl_existenciaalma.setModel(this.jtable_modelo_exisalma);
                    jtbl_existenciaalma.setName("jtbl_existenciaalma"); // NOI18N
                    jtbl_existenciaalma.addMouseListener(new java.awt.event.MouseAdapter() {
                        public void mouseClicked(java.awt.event.MouseEvent evt) {
                            jtbl_existenciaalmaMouseClicked(evt);
                            if(evt.getClickCount() >= 2)
                            {
                                dioclick(evt);
                                //System.out.println(" double click" );
                            }
                        }
                    });
                    jScrollPane5.setViewportView(jtbl_existenciaalma);

                    javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
                    jPanel4.setLayout(jPanel4Layout);
                    jPanel4Layout.setHorizontalGroup(
                        jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(jScrollPane5, javax.swing.GroupLayout.DEFAULT_SIZE, 314, Short.MAX_VALUE)
                    );
                    jPanel4Layout.setVerticalGroup(
                        jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(jScrollPane5, javax.swing.GroupLayout.DEFAULT_SIZE, 100, Short.MAX_VALUE)
                    );

                    jPanel5.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel5.border.title"))); // NOI18N
                    jPanel5.setName("jPanel5"); // NOI18N

                    jScrollPane4.setName("jScrollPane4"); // NOI18N

                    jtbl_kardex.setModel(this.jtable_modelo_kardex);
                    jtbl_kardex.setName("jtbl_kardex"); // NOI18N
                    jtbl_kardex.addMouseListener(new java.awt.event.MouseAdapter() {
                        public void mouseClicked(java.awt.event.MouseEvent evt) {
                            jtbl_kardexMouseClicked(evt);
                        }
                    });
                    jtbl_kardex.addKeyListener(new java.awt.event.KeyAdapter() {
                        public void keyPressed(java.awt.event.KeyEvent evt) {
                            jtbl_kardexKeyPressed(evt);
                        }
                    });
                    jScrollPane4.setViewportView(jtbl_kardex);

                    javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
                    jPanel5.setLayout(jPanel5Layout);
                    jPanel5Layout.setHorizontalGroup(
                        jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 932, Short.MAX_VALUE)
                    );
                    jPanel5Layout.setVerticalGroup(
                        jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 332, Short.MAX_VALUE)
                    );

                    javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
                    jPanel2.setLayout(jPanel2Layout);
                    jPanel2Layout.setHorizontalGroup(
                        jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(jPanel2Layout.createSequentialGroup()
                            .addContainerGap()
                            .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                            .addContainerGap())
                    );
                    jPanel2Layout.setVerticalGroup(
                        jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(jPanel2Layout.createSequentialGroup()
                            .addContainerGap()
                            .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(18, 18, 18)
                            .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    );

                    jTabbedPane1.addTab(resourceMap.getString("jPanel2.TabConstraints.tabTitle"), jPanel2); // NOI18N

                    jPanel3.setName("jPanel3"); // NOI18N

                    jPanel6.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel6.border.title"))); // NOI18N
                    jPanel6.setName("jPanel6"); // NOI18N

                    jScrollPane6.setName("jScrollPane6"); // NOI18N

                    jtbl_estadisticaconsumo.setModel(this.jtable_modelo_estidisticamen);
                    jtbl_estadisticaconsumo.setName("jtbl_estadisticaconsumo"); // NOI18N
                    jtbl_existenciaalma.addMouseListener(new java.awt.event.MouseAdapter() {
                        public void mouseClicked(java.awt.event.MouseEvent evt) {
                            jtbl_existenciaalmaMouseClicked(evt);
                            if(evt.getClickCount() >= 2)
                            {
                                dioclick(evt);
                                //System.out.println(" double click" );
                            }
                        }
                    });
                    jScrollPane6.setViewportView(jtbl_estadisticaconsumo);

                    jtf_descripcion_estadistica.setName("jtf_descripcion_estadistica"); // NOI18N

                    jLabel4.setText(resourceMap.getString("jLabel4.text")); // NOI18N
                    jLabel4.setName("jLabel4"); // NOI18N

                    javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
                    jPanel6.setLayout(jPanel6Layout);
                    jPanel6Layout.setHorizontalGroup(
                        jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(jPanel6Layout.createSequentialGroup()
                            .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 67, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jtf_descripcion_estadistica, javax.swing.GroupLayout.PREFERRED_SIZE, 354, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addContainerGap())
                        .addComponent(jScrollPane6, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 942, Short.MAX_VALUE)
                    );
                    jPanel6Layout.setVerticalGroup(
                        jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(jPanel6Layout.createSequentialGroup()
                            .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jLabel4)
                                .addComponent(jtf_descripcion_estadistica, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 22, Short.MAX_VALUE)
                            .addComponent(jScrollPane6, javax.swing.GroupLayout.PREFERRED_SIZE, 185, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(170, 170, 170))
                    );

                    javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
                    jPanel3.setLayout(jPanel3Layout);
                    jPanel3Layout.setHorizontalGroup(
                        jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
                            .addComponent(jPanel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addContainerGap())
                    );
                    jPanel3Layout.setVerticalGroup(
                        jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(jPanel3Layout.createSequentialGroup()
                            .addContainerGap()
                            .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addContainerGap(92, Short.MAX_VALUE))
                    );

                    jTabbedPane1.addTab(resourceMap.getString("jPanel3.TabConstraints.tabTitle"), jPanel3); // NOI18N

                    jMenuBar1.setName("jMenuBar1"); // NOI18N

                    jMenu1.setText(resourceMap.getString("jMenu1.text")); // NOI18N
                    jMenu1.setName("jMenu1"); // NOI18N

                    jmni_salir.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.ALT_MASK));
                    jmni_salir.setIcon(resourceMap.getIcon("jmni_salir.icon")); // NOI18N
                    jmni_salir.setText(resourceMap.getString("jmni_salir.text")); // NOI18N
                    jmni_salir.setName("jmni_salir"); // NOI18N
                    jmni_salir.addActionListener(new java.awt.event.ActionListener() {
                        public void actionPerformed(java.awt.event.ActionEvent evt) {
                            jmni_salirActionPerformed(evt);
                        }
                    });
                    jMenu1.add(jmni_salir);

                    jMenuBar1.add(jMenu1);

                    jMenu2.setText(resourceMap.getString("jMenu2.text")); // NOI18N
                    jMenu2.setName("jMenu2"); // NOI18N

                    jmni_escape.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_ESCAPE, 0));
                    jmni_escape.setText(resourceMap.getString("jmni_escape.text")); // NOI18N
                    jmni_escape.setName("jmni_escape"); // NOI18N
                    jmni_escape.addActionListener(new java.awt.event.ActionListener() {
                        public void actionPerformed(java.awt.event.ActionEvent evt) {
                            jmni_escapeActionPerformed(evt);
                        }
                    });
                    jMenu2.add(jmni_escape);

                    jMenuBar1.add(jMenu2);

                    jMenu3.setText(resourceMap.getString("jMenu3.text")); // NOI18N
                    jMenu3.setName("jMenu3"); // NOI18N
                    jMenuBar1.add(jMenu3);

                    setJMenuBar(jMenuBar1);

                    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
                    getContentPane().setLayout(layout);
                    layout.setHorizontalGroup(
                        layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(jTabbedPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 973, Short.MAX_VALUE)
                    );
                    layout.setVerticalGroup(
                        layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(layout.createSequentialGroup()
                            .addContainerGap()
                            .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 558, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addContainerGap(59, Short.MAX_VALUE))
                    );

                    pack();
                }// </editor-fold>//GEN-END:initComponents

    private void jmni_salirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jmni_salirActionPerformed
        // TODO add your handling code here:
        this.dispose();
    }//GEN-LAST:event_jmni_salirActionPerformed

    private void jmni_escapeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jmni_escapeActionPerformed
        // TODO add your handling code here:
        this.jmni_salirActionPerformed(evt);
    }//GEN-LAST:event_jmni_escapeActionPerformed

    private void jtbl_kardexMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jtbl_kardexMouseClicked
        // TODO add your handling code here:
}//GEN-LAST:event_jtbl_kardexMouseClicked

    private void jtbl_kardexKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jtbl_kardexKeyPressed
        // TODO add your handling code here:
}//GEN-LAST:event_jtbl_kardexKeyPressed

    private void jcbx_statusinsumoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jcbx_statusinsumoActionPerformed
        // TODO add your handling code here:
       
}//GEN-LAST:event_jcbx_statusinsumoActionPerformed

    private void jtf_itemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_itemActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jtf_itemActionPerformed

    private void jcbx_tipoelementoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jcbx_tipoelementoActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_jcbx_tipoelementoActionPerformed

    private void jcbx_familiaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jcbx_familiaActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_jcbx_familiaActionPerformed

    private void jcbx_lineaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jcbx_lineaActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_jcbx_lineaActionPerformed

    private void jdc_ultimacompraKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jdc_ultimacompraKeyPressed
        // TODO add your handling code here:
}//GEN-LAST:event_jdc_ultimacompraKeyPressed

    private void jdc_ultimaventaKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jdc_ultimaventaKeyPressed
        // TODO add your handling code here:
}//GEN-LAST:event_jdc_ultimaventaKeyPressed

    private void jtf_valorxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_valorxActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_jtf_valorxActionPerformed

    private void jbtn_guardacambiosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_guardacambiosActionPerformed
        // TODO add your handling code here:
        if(JOptionPane.showConfirmDialog(null, "Estan Correctos sus Datos?")==0) {
            this.insumo_actualizar();
        }
}//GEN-LAST:event_jbtn_guardacambiosActionPerformed

    private void jbtn_salirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_salirActionPerformed
        // TODO add your handling code here:
        this.jmni_salirActionPerformed(evt);
}//GEN-LAST:event_jbtn_salirActionPerformed

    private void jbtn_ayudaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_ayudaActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jbtn_ayudaActionPerformed
 private void jtbl_existenciaalmaMouseClicked(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
    }
 

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new insumos_articulos_edita().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel27;
    private javax.swing.JLabel jLabel28;
    private javax.swing.JLabel jLabel29;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel30;
    private javax.swing.JLabel jLabel31;
    private javax.swing.JLabel jLabel32;
    private javax.swing.JLabel jLabel33;
    private javax.swing.JLabel jLabel34;
    private javax.swing.JLabel jLabel35;
    private javax.swing.JLabel jLabel36;
    private javax.swing.JLabel jLabel37;
    private javax.swing.JLabel jLabel38;
    private javax.swing.JLabel jLabel39;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel40;
    private javax.swing.JLabel jLabel41;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenu jMenu2;
    private javax.swing.JMenu jMenu3;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JScrollPane jScrollPane5;
    private javax.swing.JScrollPane jScrollPane6;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JButton jbtn_ayuda;
    private javax.swing.JButton jbtn_guardacambios;
    private javax.swing.JButton jbtn_salir;
    private javax.swing.JComboBox jcbx_familia;
    private javax.swing.JComboBox jcbx_linea;
    private javax.swing.JComboBox jcbx_statusinsumo;
    private javax.swing.JComboBox jcbx_tipoelemento;
    private com.toedter.calendar.JDateChooser jdc_ultimacompra;
    private com.toedter.calendar.JDateChooser jdc_ultimaventa;
    private javax.swing.JMenuItem jmni_escape;
    private javax.swing.JMenuItem jmni_salir;
    private javax.swing.JTextArea jta_observacion;
    private javax.swing.JTable jtbl_estadisticaconsumo;
    private javax.swing.JTable jtbl_existenciaalma;
    private javax.swing.JTable jtbl_kardex;
    private javax.swing.JTextField jtf_claveinsumo;
    private javax.swing.JTextField jtf_controlalmacen;
    private javax.swing.JTextField jtf_costopromedio;
    private javax.swing.JTextField jtf_descripcion;
    private javax.swing.JTextField jtf_descripcion_estadistica;
    private javax.swing.JTextField jtf_factor;
    private javax.swing.JTextField jtf_idproveedor;
    private javax.swing.JTextField jtf_impuesto1;
    private javax.swing.JTextField jtf_impuesto2;
    private javax.swing.JTextField jtf_insucodigo;
    private javax.swing.JTextField jtf_item;
    private javax.swing.JTextField jtf_precio1;
    private javax.swing.JTextField jtf_precio2;
    private javax.swing.JTextField jtf_proveedordescribe;
    private javax.swing.JTextField jtf_stockmaximo;
    private javax.swing.JTextField jtf_stockminimo;
    private javax.swing.JTextField jtf_ultimocosto;
    private javax.swing.JTextField jtf_unidadempake;
    private javax.swing.JTextField jtf_unidadentrada;
    private javax.swing.JTextField jtf_unidadsalida;
    private javax.swing.JTextField jtf_valorx;
    // End of variables declaration//GEN-END:variables

}
